import axios from 'axios';

axios.interceptors.request.use((config) => {
    const token = window.sessionStorage.getItem('token');
    if (token) config.headers.token = token;
    return config;
});

axios.interceptors.response.use((response) => {
    return response.data;
});

export default axios;
